---
title: "Coercive Recruitment and Combatant Socialization: Reanalyzing the Role of Child Soldiering on Conflict-Related Sexual Violence"
author: "Changwook Ju"
date: "`r Sys.Date()`"
output:
  word_document: default
fontsize: 12pt
---

# Preamble and Globals

```{r setup, include=FALSE}
rm(list = ls()) # clean the global environment
knitr::opts_chunk$set(message = FALSE, warning = FALSE)
options(scipen = 999) # remove scientific notations
```

# Statamarkdown

```{r}
#install.packages("remotes")
#library(remotes)
#install_github("hemken/Statamarkdown")
library(Statamarkdown)
```

# Faulkner and Welsh (2022)

## US DoS

```{stata, error = FALSE}

use "data\Faulkner_Welsh_2022.dta", clear

set cformat %9.2f

# Appendix Table A4 (Model 1)

ologit statedept_sv csindex secession islam com central_control territory ///
		state_support lootable1 duration autocracy side_a_sexviolence, ///
		cluster(side_b)

estimates store ologit
estimates stats ologit

parmest, saving("./results/cs_usdos_ol", replace) level(95 90)

ziologit statedept_sv csindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence, ///
		  inflate(csindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence) ///
		  vce(cluster side_b) difficult

parmest, saving("./results/cs_usdos_ziol.dta", replace) level(95 90)

estimates store ziologit
estimates stats ziologit

# Appendix Table 5A (Model 1)

ologit statedept_sv forceindex secession islam com central_control territory ///
		state_support lootable1 duration autocracy side_a_sexviolence, ///
		cluster(side_b) 

estimates store ologit
estimates stats ologit

parmest, saving("./results/fcr_usdos_ol.dta", replace) level(95 90)

ziologit statedept_sv forceindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence, ///
		  inflate(forceindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence) ///
		  vce(cluster side_b)

parmest, saving("./results/fcr_usdos_ziol.dta", replace) level(95 90)

estimates store ziologit
estimates stats ziologit

```

## AI

```{stata, error = FALSE}

use "data\Faulkner_Welsh_2022.dta", clear

set cformat %9.2f

# Appendix Table A4 (Model 2)

ologit ai_sv csindex secession islam com central_control territory ///
		state_support lootable1 duration autocracy side_a_sexviolence, ///
		cluster(side_b)

estimates store ologit
estimates stats ologit

parmest, saving("./results/cs_ai_ol", replace) level(95 90)

# delete state_support in the inflation stage to avoid overfitting
ziologit ai_sv csindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence, ///
		  inflate(csindex secession islam com central_control territory ///
		  lootable1 duration autocracy side_a_sexviolence) ///
		  vce(cluster side_b)
		
parmest, saving("./results/cs_ai_ziol.dta", replace) level(95 90)

estimates store ziologit
estimates stats ziologit	
		
# Appendix Table A5 (Model 2)
		
ologit ai_sv forceindex secession islam com central_control territory ///
		state_support lootable1 duration autocracy side_a_sexviolence, ///
		cluster(side_b) 

estimates store ologit
estimates stats ologit

parmest, saving("./results/fcr_ai_ol.dta", replace) level(95 90)	

# delete state_support in the inflation stage to avoid overfitting
ziologit ai_sv forceindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence, ///
		  inflate(forceindex secession islam com central_control territory ///
		  lootable1 duration autocracy side_a_sexviolence) ///
		  vce(cluster side_b)
		
parmest, saving("./results/fcr_ai_ziol.dta", replace) level(95 90)

estimates store ziologit
estimates stats ziologit

```

## Max

```{stata, error = FALSE}

use "data\Faulkner_Welsh_2022.dta", clear

gen max_sv = max(statedept_sv, ai_sv, hrw_sv), before(statedept_sv)

set cformat %9.2f

# Additional Analysis 1

ologit max_sv csindex secession islam com central_control territory ///
		state_support lootable1 duration autocracy side_a_sexviolence, ///
		cluster(side_b)

estimates store ologit
estimates stats ologit

parmest, saving("./results/cs_max_ol", replace) level(95 90)

ziologit max_sv csindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence, ///
		  inflate(csindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence) ///
		  vce(cluster side_b) difficult
		
parmest, saving("./results/cs_max_ziol.dta", replace) level(95 90)

estimates store ziologit
estimates stats ziologit	
		
# Additional Analysis 2
		
ologit max_sv forceindex secession islam com central_control territory ///
		state_support lootable1 duration autocracy side_a_sexviolence, ///
		cluster(side_b) 

estimates store ologit
estimates stats ologit

parmest, saving("./results/fcr_max_ol.dta", replace) level(95 90)	

ziologit max_sv forceindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence, ///
		  inflate(forceindex secession islam com central_control territory ///
		  state_support lootable1 duration autocracy side_a_sexviolence) ///
		  vce(cluster side_b) difficult
		
parmest, saving("./results/fcr_max_ziol.dta", replace) level(95 90)

estimates store ziologit
estimates stats ziologit

```
